<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title></title>
		<style>
			* {
				padding: 0;
				margin: 0;
			}
			
			img {
				width:200px;
				margin:5px;
				display:block;
				float:left;
			}
		</style>
		<script type="text/javascript">
			window.onload = function(){
				//1.抓元素
				var imgs = document.getElementsByTagName('img');
				//2.给所有的img标签点击事件
				for (var i=0;i<imgs.length;i++) {
					imgs[i].onclick = function(){
						this.style.visibility = 'hidden';
					}
				}
			}
		</script>
	</head>

	<body>
		<!--img[src='images/$.jpg']*30-->
		<img src="images/1.jpg" alt="" />
		<img src="images/2.jpg" alt="" />
		<img src="images/3.jpg" alt="" />
		<img src="images/4.jpg" alt=""/>
		<img src="images/5.jpg" alt="" />
		<img src="images/6.jpg" alt="" />
		<img src="images/7.jpg" alt="" />
		<img src="images/8.jpg" alt="" />
		<img src="images/9.jpg" alt="" />
		<img src="images/10.jpg" alt="" />
		<img src="images/11.jpg" alt="" />
		<img src="images/12.jpg" alt="" />
		<img src="images/13.jpg" alt="" />
		<img src="images/14.jpg" alt="" />
		<img src="images/15.jpg" alt="" />
		<img src="images/16.jpg" alt="" />
		<img src="images/17.jpg" alt="" />
		<img src="images/18.jpg" alt="" />
		<img src="images/19.jpg" alt="" />
		<img src="images/20.jpg" alt="" />
		<img src="images/21.jpg" alt="" />
		<img src="images/22.jpg" alt="" />
		<img src="images/23.jpg" alt="" />
		<img src="images/24.jpg" alt="" />
		<img src="images/25.jpg" alt="" />
		<img src="images/26.jpg" alt="" />
		<img src="images/27.jpg" alt="" />
		<img src="images/28.jpg" alt="" />
		<img src="images/29.jpg" alt="" />
		<img src="images/30.jpg" alt="" />

	</body>

</html>